package com.hcy.mqclient.message;

import com.hcy.mqmodel.dto.request.MessageListRequestDTO;
import com.hcy.mqmodel.dto.request.PushOrderRequestDTO;
import com.hcy.mqmodel.dto.request.PushSyncMessageRequestDTO;
import com.hcy.rabbitbasicmodel.model.ResponseData;
import org.apache.rocketmq.client.producer.SendResult;
import org.apache.rocketmq.common.message.Message;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * @Author huchenying
 * @Description
 * @Date 2022/3/15 20:08
 */
@FeignClient(name = "rabbit-mq-service")
public interface MessageServiceClient {
    @PostMapping("/runtime/pushSyncOrder")
    ResponseData<SendResult> pushSyncOrder(@Validated @RequestBody PushOrderRequestDTO requestDTO);
    @PostMapping("/runtime/pushSyncDelayOrder")
    ResponseData<SendResult> pushSyncDelayOrder(@Validated @RequestBody PushOrderRequestDTO requestDTO);
    @PostMapping("/runtime/pushSyncMessage")
    ResponseData<SendResult> pushSyncMessage(@Validated @RequestBody PushSyncMessageRequestDTO requestDTO);
    @PostMapping("/runtime/pushSyncMessage0")
    ResponseData<SendResult> pushSyncMessage0(@Validated @RequestBody Message message);
    @PostMapping("/runtime/pushAsyncMessage")
    ResponseData<SendResult> pushAsyncMessage(@Validated @RequestBody Message message);
    @PostMapping("/runtime/pushAsyncMessageList")
    ResponseData<SendResult> pushAsyncMessageList(@Validated @RequestBody MessageListRequestDTO messageList);
}
